Add vif: OCaml 5 web framework with Miou multicore scheduler#84
Closed
BennyFranciscus wants to merge 1 commit intomainfrom
Closed
Add vif: OCaml 5 web framework with Miou multicore scheduler#84BennyFranciscus wants to merge 1 commit intomainfrom
BennyFranciscus wants to merge 1 commit intomainfrom
Conversation
vif is built on httpcats and the Miou cooperative/preemptive scheduler, taking advantage of OCaml 5 domains for multicore HTTP serving. Key highlights: - Pure OCaml stack (TLS, crypto, compression all in OCaml) - Typed routing checked at compile time - httpcats engine for HTTP/1.1 parsing and connection management - Gzip compression via decompress (pure OCaml zlib implementation) Endpoints: baseline, pipelined, json, compression, upload, db, noisy, mixed References: - https://github.com/robur-coop/vif - https://github.com/robur-coop/httpcats - Tutorial: https://robur-coop.github.io/vif/
Collaborator
Author
|
Closing this to reopen from my fork — branch protection on MDA2AV/HttpArena blocks pushes to fix the CI build error. Opening a new PR with the type fix from BennyFranciscus/HttpArena shortly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds vif — a simple web framework for OCaml 5 built on httpcats and the Miou cooperative/preemptive scheduler.
Why vif?
vif takes advantage of OCaml 5 multicore via Miou domains. The entire HTTP stack is pure OCaml — TLS, crypto, compression, HTTP parsing — which is pretty unique in the framework landscape. The httpcats benchmarks show impressive throughput (~7.9M req/s at 128c on Ryzen 9).
As requested by @MDA2AV in #25, this replaces the Dream entry with vif as the OCaml representative — it's the more performance-oriented choice with real multicore support.
Key features
Architecture
Single compiled binary using dune, multicore via Miou. JSON handling via Yojson, SQLite via sqlite3-ocaml. Docker build based on
ocaml/opam:debian-12-ocaml-5.3.Tests subscribed
baseline, pipelined, limited-conn, json, upload, compression, noisy, mixed
References